package com.android.projectsquirrel;

import java.util.List;

import android.graphics.drawable.Drawable;
import android.os.Bundle;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;

public class MapListing extends MapActivity {
	private List<Overlay> mapOverlays;
	private MapOverlay itemizedoverlay;
	
	
	public void onCreate(Bundle savedInstance) {
		super.onCreate(savedInstance);
		setContentView(R.layout.maplisting);
		MapView mapView = (MapView)findViewById(R.id.mapview);
		mapView.setBuiltInZoomControls(true);
		mapOverlays = mapView.getOverlays();
		Drawable drawable = this.getResources().getDrawable(R.drawable.marker_red);
		itemizedoverlay = new MapOverlay(drawable, this);
		createPoints();
	}
	@Override
	protected boolean isRouteDisplayed() {
		return false;
	}
	
	private void createPoints() {
		GeoPoint pointHome = new GeoPoint(41854383,-87666955);
		OverlayItem overlayItem = new OverlayItem(pointHome, "Home", "Selected Home!");
		itemizedoverlay.addOverlay(overlayItem);
		mapOverlays.add(itemizedoverlay);
		
	}
	
	

}
